//
//  Date+HTAddition.swift
//  MagaCore
//
//  Created by MrMessy on 2023/5/18.
//

import Foundation

extension Date {
  func formatString(dateFormat: String) -> String {
    let var_dateFormatter = DateFormatter()
    var_dateFormatter.dateFormat = dateFormat
    return var_dateFormatter.string(from: self)
  }

	// 当前时间戳
	var timeStamp : String {
		let var_timeInterval: TimeInterval = self.timeIntervalSince1970
		let var_timeStamp = Int(var_timeInterval)
		return "\(var_timeStamp)"
	}
}
